﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Microhard.Core.DBUtility
{
    public enum OperationStatus
    {
        Add = 1,
        Update = 2,
        Delete = 3
    }

    [Serializable]
    public class BasePermissionModel
    {
        public Guid OperatorID { set; get; }
        public Guid CurrentPermissionID { set; get; }
        [ModelRESIDAttribute]
        public Guid CurrentPermissionResourceID { set; get; }
        public string CurrentPermissionResourceName { set; get; }
        public bool CanDeleteOrUpdate { set; get; }
        public OperationStatus OperationStatus { set; get; }
        public string ApproveAdervise { set; get; }
        public bool IsOnApproving { set; get; }
        public string DisplayCSS {
            get {
                if (this.CanDeleteOrUpdate)
                    return "display:''";
                return "display:none";
            }
        }
    }
}
